<!DOCTYPE html>
<html lang="en">

<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta charset="utf-8" />
    <title>编辑信息</title>
    <meta name="description" content="Common form elements and layouts" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />

    <!-- bootstrap & fontawesome -->
    <link rel="stylesheet" href="assets/css/bootstrap.min.css" />
    <link rel="stylesheet" href="assets/font-awesome/4.5.0/css/font-awesome.min.css" />

    <!-- page specific plugin styles -->
    <link rel="stylesheet" href="assets/css/jquery-ui.custom.min.css" />
    <link rel="stylesheet" href="assets/css/chosen.min.css" />
    <link rel="stylesheet" href="assets/css/bootstrap-datepicker3.min.css" />
    <link rel="stylesheet" href="assets/css/bootstrap-timepicker.min.css" />
    <link rel="stylesheet" href="assets/css/daterangepicker.min.css" />
    <link rel="stylesheet" href="assets/css/bootstrap-datetimepicker.min.css" />
    <link rel="stylesheet" href="assets/css/bootstrap-colorpicker.min.css" />

    <!-- text fonts -->
    <link rel="stylesheet" href="assets/css/fonts.googleapis.com.css" />

    <!-- ace styles -->
    <link rel="stylesheet" href="assets/css/ace.min.css" class="ace-main-stylesheet" id="main-ace-style" />

    <!--[if lte IE 9]>
    <link rel="stylesheet" href="assets/css/ace-part2.min.css" class="ace-main-stylesheet"/>
    <![endif]-->
    <link rel="stylesheet" href="assets/css/ace-skins.min.css" />
    <link rel="stylesheet" href="assets/css/ace-rtl.min.css" />

    <!--[if lte IE 9]>
    <link rel="stylesheet" href="assets/css/ace-ie.min.css"/>
    <![endif]-->

    <!-- inline styles related to this page -->

    <!-- ace settings handler -->
    <script src="assets/js/ace-extra.min.js"></script>


    <script src="assets/js/html5shiv.min.js"></script>
    <script src="assets/js/respond.min.js"></script>
    <![endif]-->
</head>
<script>
    if (sessionStorage.getItem('login_msg') !== '登陆成功') {
        window.location.href = 'login.html'
    }
</script>

<body class="no-skin">
<div id="navbar" class="navbar navbar-default  ace-save-state">
    <div class="navbar-container ace-save-state" id="navbar-container">


        <div class="navbar-header pull-left">
            <a href="index.html" class="navbar-brand">
                <small>
                    <i class="fa fa-leaf"></i>
                    项目管理子系统
                </small>
            </a>
        </div>

        <div class="navbar-buttons navbar-header pull-right" role="navigation">
            <button type="button" class="navbar-toggle menu-toggler pull-left" id="menu-toggler"
                    data-target="#sidebar">
                <span class="sr-only">Toggle sidebar</span>

                <span class="icon-bar"></span>

                <span class="icon-bar"></span>

                <span class="icon-bar"></span>
            </button>
            <ul class="nav ace-nav">
                <li class="light-blue dropdown-modal">
                    <a data-toggle="dropdown" href="#" class="dropdown-toggle">
                        <img class="nav-user-photo" src="assets/images/avatars/user.jpg"
                             alt="Jason's Photo" />
                        <span class="user-info">
									<small>欢迎,</small>
									<p id="yourName"></p>
								</span>

                        <i class="ace-icon fa fa-caret-down"></i>
                    </a>

                    <ul
                            class="user-menu dropdown-menu-right dropdown-menu dropdown-yellow dropdown-caret dropdown-close">
                        <li>
                            <a href="profile.html">
                                <i class="ace-icon fa fa-user"></i>
                                个人主页
                            </a>
                        </li>
                        <li class="divider"></li>
                        <li>
                            <a href="login.html">
                                <i class="ace-icon fa fa-power-off"></i>
                                退出登陆
                            </a>
                        </li>
                    </ul>
                </li>
            </ul>
        </div>
    </div><!-- /.navbar-container -->
</div>

<div class="main-container ace-save-state" id="main-container">
    <script type="text/javascript">
        try {
            ace.settings.loadState('main-container')
        } catch (e) {}
    </script>

    <div id="sidebar" class="sidebar   responsive   ace-save-state">
        <script type="text/javascript">
            try {
                ace.settings.loadState('sidebar')
            } catch (e) {}
        </script>

        <ul class="nav nav-list">
            <li class="">
                <a href="index.html">
                    <i class="menu-icon fas fa-home"></i>
                    <span class="menu-text"> 首页 </span>
                </a>

                <b class="arrow"></b>
            </li>

            <li class=""  id="user_manage">
                <a href="#" class="dropdown-toggle">
                    <i class="menu-icon fa fa-users"></i>
                    <span class="menu-text">
								用户管理
							</span>

                    <b class="arrow fa fa-angle-down"></b>
                </a>

                <b class="arrow"></b>

                <ul class="submenu">
                    <li class="">
                        <a href="user_manage/info.html">
                            <i class="menu-icon fa fa-caret-right"></i>
                            用户信息
                        </a>
                    </li>

                </ul>
            </li>

            <li class="" id="project_manage">
                <a href="#" class="dropdown-toggle">
                    <i class="menu-icon fas fa-project-diagram"></i>
                    <span class="menu-text"> 项目管理 </span>

                    <b class="arrow fa fa-angle-down"></b>
                </a>

                <b class="arrow"></b>

                <ul class="submenu">
                    <li class="">
                        <a href="project_manage/project_info.html">
                            <i class="menu-icon fa fa-caret-right"></i>
                            项目信息
                        </a>

                        <b class="arrow"></b>
                    </li>

                    <li class="">
                        <a href="project_manage/add_project.html">
                            <i class="menu-icon fa fa-caret-right"></i>
                            发布任务
                        </a>

                        <b class="arrow"></b>
                    </li>
                </ul>
            </li>

            <li class="" id="document_manage">
                <a href="#" class="dropdown-toggle">
                    <i class="menu-icon fas fa-folder"></i>
                    <span class="menu-text"> 文档管理 </span>

                    <b class="arrow fa fa-angle-down"></b>
                </a>

                <b class="arrow"></b>

                <ul class="submenu">
                    <li class="">
                        <a href="document_manage/statistics.html">
                            <i class="menu-icon fa fa-caret-right"></i>
                            文档统计
                        </a>

                        <b class="arrow"></b>
                    </li>

                    <li class="">
                        <a href="document_manage/edit.html">
                            <i class="menu-icon fa fa-caret-right"></i>
                            文档标准化命名
                        </a>

                        <b class="arrow"></b>
                    </li>

                    <li class="">
                        <a href="document_manage/upload.html">
                            <i class="menu-icon fa fa-caret-right"></i>
                            文档上传
                        </a>

                        <b class="arrow"></b>
                    </li>
                </ul>
            </li>

            <li class=""  id="notice">
                <a href="#" class="dropdown-toggle">
                    <i class="menu-icon fa fa-comment"></i>
                    <span class="menu-text"> 通知管理 </span>

                    <b class="arrow fa fa-angle-down"></b>
                </a>

                <b class="arrow"></b>

                <ul class="submenu">
                    <li class="">
                        <a href="notice/publish.html">
                            <i class="menu-icon fa fa-caret-right"></i>
                            通知发布
                        </a>

                        <b class="arrow"></b>
                    </li>

                    <li class="">
                        <a href="notice/send.html">
                            <i class="menu-icon fa fa-caret-right"></i>
                            通知发送
                        </a>

                        <b class="arrow"></b>
                    </li>
                </ul>
            </li>

            <li class="" id="meeting">
                <a href="#" class="dropdown-toggle">
                    <i class="menu-icon fa fa-coffee"></i>
                    <span class="menu-text">
								会议管理
							</span>

                    <b class="arrow fa fa-angle-down"></b>
                </a>

                <b class="arrow"></b>

                <ul class="submenu">
                    <li class="">
                        <a href="meeting/record.html">
                            <i class="menu-icon fa fa-caret-right"></i>
                            会议记录
                        </a>

                        <b class="arrow"></b>
                    </li>

                    <li class="">
                        <a href="meeting/notice.html">
                            <i class="menu-icon fa fa-caret-right"></i>
                            会议通知
                        </a>

                        <b class="arrow"></b>
                    </li>

                </ul>
            </li>

            <li class="" id="money">
                <a href="#" class="dropdown-toggle">
                    <i class="menu-icon fas fa-dollar-sign"></i>
                    <span class="menu-text">
								资产管理
							</span>

                    <b class="arrow fa fa-angle-down"></b>
                </a>

                <b class="arrow"></b>

                <ul class="submenu">
                    <li class="">
                        <a href="money/money.html">
                            <i class="menu-icon fa fa-caret-right"></i>
                            资产信息管理
                        </a>

                        <b class="arrow"></b>
                    </li>

                </ul>
            </li>

            <li class=""  id="contract">
                <a href="#" class="dropdown-toggle">
                    <i class="menu-icon fas fa-file-contract"></i>
                    <span class="menu-text">
								合同管理
							</span>

                    <b class="arrow fa fa-angle-down"></b>
                </a>

                <b class="arrow"></b>

                <ul class="submenu">
                    <li class="">
                        <a href="contract/contract.html">
                            <i class="menu-icon fa fa-caret-right"></i>
                            合同信息管理
                        </a>

                        <b class="arrow"></b>
                    </li>

                </ul>
            </li>

            <li class="" id="process">
                <a href="#" class="dropdown-toggle">
                    <i class="menu-icon fas fa-spinner"></i>
                    <span class="menu-text">
								进度管理
							</span>

                    <b class="arrow fa fa-angle-down"></b>
                </a>

                <b class="arrow"></b>

                <ul class="submenu">
                    <li class="">
                        <a href="process/query.html">
                            <i class="menu-icon fa fa-caret-right"></i>
                            进度查询
                        </a>

                        <b class="arrow"></b>
                    </li>

                    <li class="">
                        <a href="process/warn.html">
                            <i class="menu-icon fa fa-caret-right"></i>
                            进度预警
                        </a>

                        <b class="arrow"></b>
                    </li>

                </ul>
            </li>
        </ul><!-- /.nav-list -->

        <div class="sidebar-toggle sidebar-collapse" id="sidebar-collapse">
            <i id="sidebar-toggle-icon" class="ace-icon fa fa-angle-double-left ace-save-state"
               data-icon1="ace-icon fa fa-angle-double-left"
               data-icon2="ace-icon fa fa-angle-double-right"></i>
        </div>
    </div>

    <div class="main-content">
        <div class="main-content-inner">
            <div class="breadcrumbs ace-save-state" id="breadcrumbs">
                <ul class="breadcrumb">
                    <li>
                        <i class="ace-icon fa fa-home home-icon"></i>
                        <a href="index.html">首页</a>
                    </li>

                    <li class="active">
                        <i class="fas fa-angle-right"></i>
                        编辑个人信息
                    </li>
                </ul><!-- /.breadcrumb -->

                <div class="nav-search" id="nav-search">
                    <form class="form-search">
								<span class="input-icon">
									<input type="text" placeholder="Search ..." class="nav-search-input"
                                           id="nav-search-input" autocomplete="off" />
									<i class="ace-icon fa fa-search nav-search-icon"></i>
								</span>
                    </form>
                </div><!-- /.nav-search -->
            </div>

            <div class="page-content">
                <form class="form-horizontal">
                    <div class="tabbable">
                        <ul class="nav nav-tabs padding-16">
                            <li class="active">
                                <a data-toggle="tab" href="#edit-basic">
                                    <i class="green icon-edit bigger-125"></i>
                                    基本信息
                                </a>
                            </li>
                            <li>
                                <a data-toggle="tab" href="#project_info">
                                    <i class="blue icon-key bigger-125"></i>
                                    项目信息
                                </a>
                            </li>
                            <li>
                                <a data-toggle="tab" href="#edit-password">
                                    <i class="blue icon-key bigger-125"></i>
                                    修改密码
                                </a>
                            </li>

                            <li>
                                <a data-toggle="tab" href="#delete-user">
                                    <i class="blue icon-key bigger-125"></i>
                                    注销账号
                                </a>
                            </li>
                        </ul>

                        <div class="tab-content profile-edit-tab-content">
                            <div id="edit-basic" class="tab-pane in active">
                                <h4 class="header blue bolder smaller">基本信息</h4>

                                <div class="form-group">
                                    <label class="col-sm-3 control-label no-padding-right" for="form-field-email">角色</label>
                                    <div class="col-sm-9">
                                        <span class="input-icon input-icon-right">
                                            <input type="text" disabled="disabled" id="user_role" />
                                        </span>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-3 control-label no-padding-right" for="form-field-email">登录名</label>
                                    <div class="col-sm-9">
                                        <span class="input-icon input-icon-right">
                                            <input type="text" id="form-field-login_name" />
                                        </span>
                                    </div>
                                </div>

                                <div class="space-4"></div>
                                <div class="form-group">
                                    <label class="col-sm-3 control-label no-padding-right" for="form-field-email">姓名</label>
                                    <div class="col-sm-9">
                                        <span class="input-icon input-icon-right">
                                            <input type="text" id="form-field-name" />
                                        </span>
                                    </div>
                                </div>

                                <div class="space-4"></div>


                                <div class="form-group">
                                    <label class="col-sm-3 control-label no-padding-right" for="form-field-email">邮箱</label>
                                    <div class="col-sm-9">
                                        <span class="input-icon input-icon-right">
                                            <input type="email" id="form-field-email" />
                                            <i class="icon-envelope"></i>
                                        </span>
                                    </div>
                                </div>

                                <div class="space-4"></div>

                                <div class="form-group">
                                    <label class="col-sm-3 control-label no-padding-right" for="form-field-phone">手机</label>

                                    <div class="col-sm-9">
                                        <span class="input-icon input-icon-right">
                                            <input class="input-medium input-mask-phone" type="text" id="form-field-phone" />
                                            <i class="icon-phone icon-flip-horizontal"></i>
                                        </span>
                                    </div>
                                </div>

                                <div class="space"></div>

                                <div class="col-md-offset-3 col-md-9">
                                    <button class="btn btn-info" type="button" id="save_btn1" name="save_btn1">
                                        <i class="icon-ok bigger-110"></i>
                                        保存信息
                                    </button>
                                </div>

                                <div class="space"></div>
                                <div class="space"></div>
                                <div class="space"></div>
                            </div>

                            <!--项目信息-->
                            <div id="project_info" class="tab-pane">
                                <h4 class="header blue bolder smaller">项目信息</h4>
                                <div class="space-10"></div>

                                <div class="form-group">
                                    <label class="col-sm-3 control-label no-padding-right" for="form-field-email">项目名</label>
                                    <div class="col-sm-9">
                                        <span class="input-icon input-icon-right">
                                            <input type="text" disabled="disabled" id="project_name" />
                                        </span>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-3 control-label no-padding-right" for="form-field-email">项目经理</label>
                                    <div class="col-sm-9">
                                        <span class="input-icon input-icon-right">
                                            <input type="text" disabled="disabled" id="leader_name" />
                                        </span>
                                    </div>
                                </div>

                                <h4 class="header red bolder smaller">退出项目</h4>
                                <div class="space-10"></div>

                                <div class="form-group">
                                    <label class="col-sm-3 control-label no-padding-right" for="form-field-pass1">请验证密码</label>

                                    <div class="col-sm-9">
                                        <input type="password" id="confirm_quit" value=""/>
                                    </div>
                                </div>

                                <div class="space"></div>
                                <div class="space"></div>
                                <div class="col-md-offset-3 col-md-9">
                                    <button class="btn btn-info" type="button" id="quit_project" name="quit_project">
                                        <i class="icon-ok bigger-110"></i>
                                        确认退出
                                    </button>
                                </div>
                                <div class="space"></div>
                                <div class="space"></div>
                                <div class="space"></div>
                            </div>
                            <div id="edit-password" class="tab-pane">
                                <h4 class="header blue bolder smaller">修改密码</h4>
                                <div class="space-10"></div>

                                <div class="form-group">
                                    <label class="col-sm-3 control-label no-padding-right" for="form-field-pass1">旧密码</label>

                                    <div class="col-sm-9">
                                        <input type="password" id="form-field-pass0" value=""/>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-3 control-label no-padding-right" for="form-field-pass1">新密码</label>

                                    <div class="col-sm-9">
                                        <input type="password" id="form-field-pass1" value=""/>
                                    </div>
                                </div>

                                <div class="space-4"></div>

                                <div class="form-group">
                                    <label class="col-sm-3 control-label no-padding-right" for="form-field-pass2">确认密码</label>

                                    <div class="col-sm-9">
                                        <input type="password" id="form-field-pass2" value=""/>
                                    </div>
                                </div>
                                <div class="space"></div>
                                <div class="col-md-offset-3 col-md-9">
                                    <button class="btn btn-info" type="button" id="save_btn2" name="save_btn2">
                                        <i class="icon-ok bigger-110"></i>
                                        确认修改
                                    </button>
                                </div>
                                <div class="space"></div>
                                <div class="space"></div>
                                <div class="space"></div>
                            </div>
                                <!--注销账号-->
                            <div id="delete-user" class="tab-pane">
                                <h4 class="header red bolder smaller">注销账号</h4>
                                <div class="space-10"></div>

                                <div class="form-group">
                                    <label class="col-sm-3 control-label no-padding-right" for="form-field-pass1">请验证密码</label>

                                    <div class="col-sm-9">
                                        <input type="password" id="confirm_password" value=""/>
                                    </div>
                                </div>

                                <div class="space"></div>
                                <div class="col-md-offset-3 col-md-9">
                                    <button class="btn btn-info" type="button" id="delete_btn" name="delete_btn">
                                        <i class="icon-ok bigger-110"></i>
                                        确认注销
                                    </button>
                                </div>
                                <div class="space"></div>
                                <div class="space"></div>
                                <div class="space"></div>
                            </div>

                        </div>
                    </div>

                </form>
            </div><!-- /span -->
        </div><!-- /user-profile -->
            </div><!-- /.page-content -->
        </div>
    </div><!-- /.main-content -->

    <div class="footer">
        <div class="footer-inner">
            <div class="footer-content">
						<span class="bigger-120">
							<span class="blue bolder">Ace</span>
							Application &copy; 2013-2014
						</span>

                &nbsp; &nbsp;
                <span class="action-buttons">
							<a href="#">
								<i class="ace-icon fa fa-twitter-square light-blue bigger-150"></i>
							</a>

							<a href="#">
								<i class="ace-icon fa fa-facebook-square text-primary bigger-150"></i>
							</a>

							<a href="#">
								<i class="ace-icon fa fa-rss-square orange bigger-150"></i>
							</a>
						</span>
            </div>
        </div>
    </div>

    <a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
        <i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i>
    </a>
</div><!-- /.main-container -->

<!-- basic scripts -->

<!--[if !IE]> -->
<script src="assets/js/jquery-2.1.4.min.js"></script>

<!-- <![endif]-->

<!--[if IE]>
<script src="assets/js/jquery-1.11.3.min.js"></script>
<![endif]-->
<script type="text/javascript">
    if ('ontouchstart' in document.documentElement) document.write(
        "<script src='assets/js/jquery.mobile.custom.min.js'>" + "<" + "/script>");
</script>
<script src="assets/js/bootstrap.min.js"></script>

<!-- page specific plugin scripts -->

<!--[if lte IE 8]>
<script src="assets/js/excanvas.min.js"></script>
<![endif]-->
<script src="assets/js/jquery-ui.custom.min.js"></script>
<script src="assets/js/jquery.ui.touch-punch.min.js"></script>
<script src="assets/js/chosen.jquery.min.js"></script>
<script src="assets/js/spinbox.min.js"></script>
<script src="assets/js/bootstrap-datepicker.min.js"></script>
<script src="assets/js/bootstrap-timepicker.min.js"></script>
<script src="assets/js/moment.min.js"></script>
<script src="assets/js/daterangepicker.min.js"></script>
<script src="assets/js/bootstrap-datetimepicker.min.js"></script>
<script src="assets/js/bootstrap-colorpicker.min.js"></script>
<script src="assets/js/jquery.knob.min.js"></script>
<script src="assets/js/autosize.min.js"></script>
<script src="assets/js/jquery.inputlimiter.min.js"></script>
<script src="assets/js/jquery.maskedinput.min.js"></script>
<script src="assets/js/bootstrap-tag.min.js"></script>

<!-- ace scripts -->
<script src="assets/js/ace-elements.min.js"></script>
<script src="assets/js/ace.min.js"></script>
<script src="./profile.js"></script>
<!-- inline scripts related to this page -->
<script>
    function showName() {
        document.querySelector('#yourName').innerHTML = sessionStorage.getItem('user_name')
    }
    showName()
</script>
</body>
</html>

<script src="jquery-3.6.0.js"></script>
<script>
    var user_login_name = sessionStorage.getItem('user_login_name');
    var have_a_project = false;
    data = {}
    data.userName = user_login_name;
    data.action = "get_profile"
    $.post("./project/action", data, function (json) {
        json = JSON.parse(json);
        if(json.result === 1){
            var profile = json.profile[0];
            $("#form-field-login_name").val(profile.login_name);
            $("#form-field-name").val(profile.user_name);
            $("#form-field-email").val(profile.user_email);
            $("#form-field-phone").val(profile.user_mobile);
            $("#user_role").val(profile.user_role);
            $("#project_name").val(profile.project_name);
            $("#leader_name").val(profile.leader_name);
            if(profile.project_name !== "暂未获得您的项目信息")   have_a_project = true;
        }
        else alert("获取信息失败！");
    })

    document.getElementById("save_btn1").onclick = function (){
        var user_name = $("#form-field-name").val();
        var login_name = $("#form-field-login_name").val();
        var mobile = $("#form-field-phone").val();
        var email = $("#form-field-email").val();
        console.log(user_name);
        if(user_name=="" || login_name=="" || mobile =="" || email == "")
        {
            alert("信息不能为空！");
            return;
        }
        var profile = {}
        profile.id = sessionStorage.getItem('user_id');
        profile.user_name = user_name;
        profile.login_name = login_name;
        profile.mobile = mobile;
        profile.email = email;
        profile.action = "save1"
        $.post("./project/action", profile, function (json) {
            json = JSON.parse(json);
            if(json.result === 1){
                sessionStorage.setItem('user_name', user_name)
                sessionStorage.setItem('user_login_name', login_name)
                alert("保存成功！");
                window.location.reload();
            }
            else alert("保存失败！");
        })
    }
    /////修改密码
    document.getElementById("save_btn2").onclick = function (){
        var old_password = $("#form-field-pass0").val();
        var new_password1 = $("#form-field-pass1").val();
        var new_password2 = $("#form-field-pass2").val();

        if(old_password=="" || new_password1=="" || new_password2 =="")
        {
            alert("密码不能为空！");
            return;
        }
        if(new_password1 != new_password2){
            alert("两次密码输入不一致！");
            return;
        }
        if (new_password1.length < 6){
            alert("新密码不能少于6位！");
            return;
        }
        var password = {}
        password.login_name = sessionStorage.getItem('user_login_name');
        password.old_password = old_password;
        password.new_password = new_password1;
        password.action = "save2";
        $.post("./project/action", password, function (json) {
            json = JSON.parse(json);
            if(json.result === 1){
                alert("密码修改成功！");
                window.location.reload();
            }
            else alert(json.fail_reason);
        })
    }
    /////注销账号
    document.getElementById("delete_btn").onclick = function (){
        var password = $("#confirm_password").val();
        if(password === ""){
            alert("密码不能为空！");
            return;
        }
        var r = confirm("账号注销后信息将丢失，您确定要注销账号吗？")
        if(r){
            info = {}
            info.login_name = sessionStorage.getItem('user_login_name');
            info.id = sessionStorage.getItem('user_id');
            info.role = sessionStorage.getItem('user_role');
            info.password = password;
            info.action = "delete_user";
            $.post("./project/action", info, function (json) {
                json = JSON.parse(json);
                if(json.result === 1){
                    alert("账号注销成功！");
                    window.location.href="login.html";
                }
                else alert(json.fail_reason);
            })
        }
    }

    /////退出项目
    document.getElementById("quit_project").onclick = function (){
        if(!have_a_project){
            alert("您还未拥有一个项目");
            return;
        }
        var password = $("#confirm_quit").val();
        if(password === ""){
            alert("密码不能为空！");
            return;
        }
        var r = confirm("您确定退出该项目？（项目经理退出项目即代表注销该项目）");
        if(r){
            info = {}
            info.login_name = sessionStorage.getItem('user_login_name');
            info.id = sessionStorage.getItem('user_id');
            info.role = sessionStorage.getItem('user_role');
            info.password = password;
            info.action = "quit_project";
            $.post("./project/action", info, function (json) {
                json = JSON.parse(json);
                if(json.result === 1){
                    alert("退出项目成功！");
                    window.location.reload();
                }
                else alert(json.fail_reason);
            })
        }
    }
</script>